// JavaScript Document


// Initializing Events
// requires expElements array
function InitEvents()
{
	var size;
	var obj;
	
	size = (expElements.length) ? expElements.length : 0;
	for(var i = 0; i < size; i++)
	{
		obj = document.forms['main'].elements[expElements[i]];
		// alert (obj.name);
		if(obj)
		{
			obj.height = red_height;
			
			obj.onfocus = expandText;
			obj.onblur = reduceText;
		}
	}
}

// Expanding Element
function expandText(evt)
{
	evt = (evt) ? evt : ((window.event) ? event : null);
	if(evt)
	{
		var obj = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null );
		obj.style.height = exp_height;
		obj.style.backgroundColor = '#E3EBFD';
	}
}

// Reducing Element
function reduceText(evt)
{
	evt = (evt) ? evt : ((window.event) ? event : null);
	if(evt)
	{
		var obj = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null );
		obj.style.height = red_height;
		obj.style.backgroundColor = '#FFFFFF';
	}
}

function JumpTo(name)
{
	window.location = '#' + name;
	obj = document.forms['main'].elements[name];
	if(obj && obj.focus) obj.focus(); 
}
